﻿using MyWeb.Model.ScheduledTask;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace MyWeb.Services.ScheduledTask
{
    /// <summary>
    /// Job数据库操作
    /// </summary>
    public interface IJobsModelService
    {
        /// <summary>
        /// 获取所有作业
        /// </summary>
        /// <returns></returns>
        Task<List<JobsModel>> GetJobs(Expression<Func<JobsModel, bool>> where);

        /// <summary>
        /// 添加任务
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<bool> AddJob(JobsModel model);

        /// <summary>
        /// 删除任务
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<bool> Remove(JobsModel model);

        /// <summary>
        /// 更新任务
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>

        Task<bool> Update(JobsModel model);
    }
}
